<?php

abstract class Adept_Request_Abstract 
{

    protected $controller = null;
    protected $parameters = array();

    /**
     * Return request parameter if exists otherwise null 
     * @param string $key
     * @return mixed
     */
    public function getParameter($key) 
    {
        return isset($this->parameters[$key]) ? $this->parameters[$key] : null;
    }

    public function setParameter($key, $value) 
    {
        $this->parameters[$key] = $value;
    }

    public function getParameters() 
    {
        return $this->parameters;
    }

    public function setParameters($parameters) 
    {
        $this->parameters = $parameters;
    }

    public function hasParameter($key) 
    {
        return isset($this->parameters[$key]);
    }

    public function getController() 
    {
        return $this->controller;
    }

    public function setController($controller) 
    {
        $this->controller = $controller;
    }

}
